// TUCAO:
// antd 只提供LESS版本，而且还是一个用很特殊的方法让LESS能执行JAVASCRIPT，然后！@#￥%……&*（）好气，晚上要多吃点

$globalColors: (
    'red': (
        #fef0ef, #fcdbd9, #fabeb9, #f79992, #f46e65, #f04134, #d73435, #bd2636, #a31837, #880a38
    ),
    'green': (
        #ebf8f2, #cfefdf, #a7e1c4, #76d0a3, #3dbd7d, #00a854, #00924c, #007b43, #00643b, #004c32
    ),
    'blue': (
        #ecf6fd, #d2eafb, #add8f7, #7ec2f3, #49a9ee, #108ee9, #0e77ca, #0c60aa, #09488a, #073069
    ),
    'pink': (
        #feeff5, #fdd8e7, #fcb8d3, #fa90ba, #f7629e, #f5317f, #dc277d, #c11c7b, #a71278, #8c0776
    ),
    'orange': (
        #fef3eb, #fde3cf, #fccca7, #faaf76, #f78e3d, #f56a00, #d75000, #b93600, #991b00, #7a0000
    ),
    'purple': (
        #f4f3fd, #e4e2fa, #cfcaf6, #b3acf2, #948aec, #7265e6, #6252cd, #533eb4, #42299a, #321580
    ),
    'yellow': (
        #fffaeb, #fff3cf, #ffe9a7, #ffdd76, #ffce3d, #ffbf00, #e09a00, #c17500, #a04f00, #802800
    ),
    'cyan': (
        #ebf8f9, #cfedf0, #a7dfe3, #76cdd3, #3db8c1, #00a2ae, #008997, #00707f, #005667, #003c4e
    ),
    'grey': (
        #fbfbfb, #f7f7f7, #f5f5f5, #e9e9e9, #d9d9d9, #bfbfbf, #919191, #5a5a5a, #404040, #222222
    ),
    'teal': (
        #EDFBF7, #D5F5EB, #B2ECDB, #87E2C7, #55D6B0, #20C997, #1CAF86, #179475, #137964, #0E5D52
    )
);

@function getColor($name, $index: 6) {
    @if not map-has-key($globalColors, $name) {
        @warn "Warning: '#{$name}' is not a valid color name.";
        @return ''
    }
    @return nth(map-get($globalColors, $name), $index)
}
